package com.jvm.oom;

/**
 * @author: csh
 * @Date: 2021/1/12 18:43
 * @Description:
 */
public class StackFrameTest {



    public static void main(String[] args) {
        StackFrameTest test = new StackFrameTest();
        test.method1();
    }

    public void method1(){
        System.out.println("method1()开始执行...");
        method2();
        System.out.println("method1()执行结束...");
    }

    private int method2() {
        System.out.println("method2()开始执行...");
        int i = 10;
        int v = (int)method3();
        System.out.println("method2()即将结束...");
        return i;
    }

    private double method3() {
        System.out.println("method3()开始执行...");
        double i = 20.0;
        System.out.println("method3()即将结束...");
        return i;
    }
}
